-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support single value for attribute list in doc.to_array #1435
Conversation
I am not a Cython expert, so could not get the Also, can I directly use |
Hi @ramananbalakrishnan, thanks for your pull request! 👍 It looks like you haven't filled in the spaCy Contributor Agreement (SCA) yet. The agrement ensures that we can use your contribution across the project. Once you've filled in the template, put it in the |
I have ported the changes over to the |
Thanks for this! It will be merged in time for the new v2 release. |
I think so. It's possible there's some quirks, but yes that's what we would want to be using. |
Done. |
* Change type-check logic to 'hasattr' (Python type-checking is brittle) * Small 'house style' edits, mostly making code more terse.
🎉 Thanks for this! Made some small changes, especially changing use of |
got it! looks much cleaner now. Also, since you are directly returning |
Closures not allowed in cpdef
Description
Doc.to_array(attr_ids)
to accept a single value inattr_ids
Types of changes
Checklist: